package com.server.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author diving
 * @since 2024-12-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Order对象", description="")
public class Orders implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private Integer uid;

    private Integer gid;

    private LocalDateTime time;

    private Integer num;
    public static Orders makeOrders(Unorder unorder) {
        Orders orders=new Orders();
        orders.id = null;
        orders.uid = unorder.getUid();
        orders.gid = unorder.getGid();
        orders.num = unorder.getNum();
        orders.time = null;
        return orders;
    }


}
